package com.kuang.pojo;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("patient")
public class User {
    //主键是自增的
    @TableId(type = IdType.AUTO)
    @Alias("序号")
    private Integer id;

    @Alias("姓名")
    private String name;
    @Alias("地址")
    private String address;
    @Alias("病症")
    private String symptom;
    @Alias("用户名")
    private String username;
    @Alias("密码")
    private String password;
    //关闭数据库和实体类字段的映射，因为数据库不存在token字段
    @TableField(exist = false)
    private String token;

    @Alias("性别")
    private String gender;
    @Alias("角色")
    private String role;
    @Alias("手机号")
    private String phone;
    @Alias("头像")
    private String avatar;
}
